﻿@model SuperiorModel.Api_ConsigneeModel
@{
    ViewBag.Title = "编辑地址";
    Layout = "~/Views/Shared/_Layout.cshtml";
    var spid = Request["spid"];
    var said = Request["said"];
    var names = string.Format("{0} {1} {2}",Model.ProvinceName,Model.CityName,Model.AreaName);
    var values = string.Format("{0},{1},{2}", Model.ProvinceCode, Model.CityCode, Model.AreaCode);
}
<style>
    * {
        touch-action: pan-y;
    }
</style>
<header class="wy-header">
    <div class="wy-header-icon-back"><a href="javascript:history.go(-1)"><span></span></a></div>
    <div class="wy-header-title">编辑地址</div>
</header>
<div class="weui-content">
    <div class="weui-cells weui-cells_form wy-address-edit">
        <div class="weui-cell">
            <div class="weui-cell__hd"><label class="weui-label wy-lab">收货人</label></div>
            <div class="weui-cell__bd"><input class="weui-input" type="text" value="@Model.ConsigneeName" id="consigneeName" placeholder="收货人"></div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__hd"><label class="weui-label wy-lab">手机号</label></div>
            <div class="weui-cell__bd"><input class="weui-input" type="number" value="@Model.ConsigneePhone" id="consigneePhone" placeholder="手机号"></div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__hd"><label for="name" class="weui-label wy-lab">所在地区</label></div>
            <div class="weui-cell__bd">
                <input class="weui-input" id="area" type="text" value="@names" readonly data-code="" data-codes="@values">
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__hd"><label class="weui-label wy-lab">详细地址</label></div>
            <div class="weui-cell__bd">
                <textarea class="weui-textarea" id="address">@Model.Address</textarea>
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__hd"><label class="weui-label wy-lab">邮政编码</label></div>
            <div class="weui-cell__bd"><input class="weui-input" type="text" value="@Model.ZipCode" id="zipCode" placeholder="邮政编码"></div>
        </div>
    </div>
    <div class="weui-btn-area">
        <a class="weui-btn weui-btn_primary" href="javascript:" aid="@Model.Id" id="showTooltips">保存此地址</a>
        <a href="javascript:;" id="delteAdd"  aid="@Model.Id" class="weui-btn weui-btn_warn">删除此地址</a>
    </div>

</div>
<script src="~/scripts/js/city-picker.js"></script>
<script src="~/scripts/ConSignee/Edit.js?v=123"></script>
<script>
    EditClass.Instancee.Init();
</script>